<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SSDP Help: D:/doxy/PublicAPI/ATEC/AtAtomic.h 文件参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SSDP Help<span id="projectnumber">&#160;2.04.01</span>
   </div>
   <div id="projectbrief">仅供测试</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.3 -->
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',false,false,'search.php','搜索');
});
/* @license-end */
</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../dir_52a01df1794e5beec01860bdd05aea48.html">PublicAPI</a></li><li class="navelem"><a class="el" href="../../dir_61153f54a0892efe919342a84eb61844.html">ATEC</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle"><div class="title">AtAtomic.h 文件参考</div></div>
</div><!--header-->
<div class="contents">

<p><a href="../../d6/db5/_at_atomic_8h_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:a3cc7a841b64aa832939d01f4255454f1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/db5/_at_atomic_8h.html#a3cc7a841b64aa832939d01f4255454f1">BE_ATOMIC_IMPL</a>(UTYPE,  TYPE_SUFFIX,  CAST_TYPE)</td></tr>
<tr class="separator:a3cc7a841b64aa832939d01f4255454f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:af5422594cded60de55e92d2c034189fe"><td class="memItemLeft" align="right" valign="top"><a id="af5422594cded60de55e92d2c034189fe" name="af5422594cded60de55e92d2c034189fe"></a>
long __cdecl&#160;</td><td class="memItemRight" valign="bottom"><b>_InterlockedIncrement</b> (long volatile *)</td></tr>
<tr class="separator:af5422594cded60de55e92d2c034189fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86bea64bece697fd4b38822cc84c8d42"><td class="memItemLeft" align="right" valign="top"><a id="a86bea64bece697fd4b38822cc84c8d42" name="a86bea64bece697fd4b38822cc84c8d42"></a>
long __cdecl&#160;</td><td class="memItemRight" valign="bottom"><b>_InterlockedDecrement</b> (long volatile *)</td></tr>
<tr class="separator:a86bea64bece697fd4b38822cc84c8d42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22e62ea08dd7f70047038cb67106b46a"><td class="memItemLeft" align="right" valign="top"><a id="a22e62ea08dd7f70047038cb67106b46a" name="a22e62ea08dd7f70047038cb67106b46a"></a>
long __cdecl&#160;</td><td class="memItemRight" valign="bottom"><b>_InterlockedExchange</b> (long volatile *, long)</td></tr>
<tr class="separator:a22e62ea08dd7f70047038cb67106b46a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d643e1760a1d58b81c00bc30240a0f7"><td class="memItemLeft" align="right" valign="top"><a id="a8d643e1760a1d58b81c00bc30240a0f7" name="a8d643e1760a1d58b81c00bc30240a0f7"></a>
long __cdecl&#160;</td><td class="memItemRight" valign="bottom"><b>_InterlockedExchangeAdd</b> (long volatile *, long)</td></tr>
<tr class="separator:a8d643e1760a1d58b81c00bc30240a0f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a452236922ea7be677d9e2df43d42b834"><td class="memItemLeft" align="right" valign="top"><a id="a452236922ea7be677d9e2df43d42b834" name="a452236922ea7be677d9e2df43d42b834"></a>
void *__cdecl&#160;</td><td class="memItemRight" valign="bottom"><b>_InterlockedExchangePointer</b> (void *volatile *, void *)</td></tr>
<tr class="separator:a452236922ea7be677d9e2df43d42b834"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9f8ec18d49f44a0e9956d003a74ef7a"><td class="memItemLeft" align="right" valign="top"><a id="ad9f8ec18d49f44a0e9956d003a74ef7a" name="ad9f8ec18d49f44a0e9956d003a74ef7a"></a>
long __cdecl&#160;</td><td class="memItemRight" valign="bottom"><b>_InterlockedCompareExchange</b> (long volatile *, long, long)</td></tr>
<tr class="separator:ad9f8ec18d49f44a0e9956d003a74ef7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa532527597f5c6c1929ff176ac35dfbd"><td class="memItemLeft" align="right" valign="top"><a id="aa532527597f5c6c1929ff176ac35dfbd" name="aa532527597f5c6c1929ff176ac35dfbd"></a>
void *__cdecl&#160;</td><td class="memItemRight" valign="bottom"><b>_InterlockedCompareExchangePointer</b> (void *volatile *, void *, void *)</td></tr>
<tr class="separator:aa532527597f5c6c1929ff176ac35dfbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><dl class="section author"><dt>作者</dt><dd>SZEWC </dd></dl>
<dl class="section date"><dt>日期</dt><dd>2022/04/28 </dd></dl>
</div><h2 class="groupheader">宏定义说明</h2>
<a id="a3cc7a841b64aa832939d01f4255454f1" name="a3cc7a841b64aa832939d01f4255454f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cc7a841b64aa832939d01f4255454f1">&#9670;&nbsp;</a></span>BE_ATOMIC_IMPL</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BE_ATOMIC_IMPL</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">UTYPE, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">TYPE_SUFFIX, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">CAST_TYPE&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">        <span class="keyword">private</span>:\</div>
<div class="line">            UTYPE <span class="keyword">volatile</span> m_value;\</div>
<div class="line">            AtAtomic&amp; operator= (AtAtomic <span class="keyword">const</span>&amp;);\</div>
<div class="line">            AtAtomic (AtAtomic <span class="keyword">const</span>&amp;);\</div>
<div class="line">        public:\</div>
<div class="line">            AtAtomic() : m_value(0) {;}\</div>
<div class="line">            AtAtomic (UInt32 v) : m_value(v) {;}\</div>
<div class="line">            UTYPE operator++()<span class="keyword">    volatile </span>{<span class="keywordflow">return</span> _InterlockedIncrement ## TYPE_SUFFIX ((CAST_TYPE <span class="keyword">volatile</span>*)&amp;m_value);}\</div>
<div class="line">            UTYPE operator++(<span class="keywordtype">int</span>)<span class="keyword"> volatile </span>{<span class="keywordflow">return</span> _InterlockedIncrement ## TYPE_SUFFIX ((CAST_TYPE <span class="keyword">volatile</span>*)&amp;m_value)-1;}\</div>
<div class="line">            UTYPE operator--()<span class="keyword">    volatile </span>{<span class="keywordflow">return</span> _InterlockedDecrement ## TYPE_SUFFIX ((CAST_TYPE <span class="keyword">volatile</span>*)&amp;m_value);}\</div>
<div class="line">            UTYPE operator--(<span class="keywordtype">int</span>)<span class="keyword"> volatile </span>{<span class="keywordflow">return</span> _InterlockedDecrement ## TYPE_SUFFIX ((CAST_TYPE <span class="keyword">volatile</span>*)&amp;m_value)+1;}\</div>
<div class="line">            UTYPE load()<span class="keyword"> const </span>{<span class="keywordflow">return</span> _InterlockedCompareExchange ## TYPE_SUFFIX ((CAST_TYPE <span class="keyword">volatile</span>*)&amp;m_value,0,0);}\</div>
<div class="line">            void store (UTYPE v)<span class="keyword"> const </span>{_InterlockedExchange ## TYPE_SUFFIX ((CAST_TYPE <span class="keyword">volatile</span>*)&amp;m_value,v);}</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3
</small></address>
</body>
</html>
